/**
 * 
 */
package br.com.ufc.apsoo.hotelar.controller;

import br.com.ufc.apsoo.hotelar.dao.EnderecoDao;
import br.com.ufc.apsoo.hotelar.dao.impl.EnderecoDaoImpl;
import br.com.ufc.apsoo.hotelar.model.Endereco;

/**
 * @author Virginia
 *
 */
public class EnderecoController {
	private Endereco endereco;
	private EnderecoDao dao;
	
	public EnderecoController() {
		endereco = new Endereco();
		dao = new EnderecoDaoImpl();
	}

	public EnderecoDao getDao() {
		return dao;
	}

	public void setDao(EnderecoDao dao) {
		this.dao = dao;
	}

	public Endereco getEndereco() {
		return endereco;
	}

	public void setEndereco(Endereco endereco) {
		this.endereco = endereco;
	}
	
	public String adicionarEndereco() {
		dao.save(endereco);
		return "index";
	}

}
